The present invention relates to a fuzzy inference apparatus and in particular, to a membership function tuning apparatus which automatically tunes membership functions.
More precisely, it is necessary to determine rules and a membership function when fuzzy inference is executed, but the task of determining these is currently performed by a system planner. However, the rules and membership functions created by the system planners are not used in that form and so it is necessary to implement optimization processing. The present invention therefore relates to a tuning apparatus which corrects rules and the membership functions created by humans while at the same time adjusting the membership functions so that fuzzy inference is efficiently executed.
A fuzzy inference apparatus uses vague information to perform inferences, and these inferences are performed in accordance with a plural number of production rules (hereinafter simply termed "rules").
A typical example of such rules is a condition-action rule. The condition-action rule is formed from a condition part (an "if" statement) and an action part (a "then" statement). The condition part is formed from one or more conditions, and a plural number of conditions are coupled by "AND". Also, the action part (the "then" statement) is formed from a single action.
As an example, when there is one condition, the rule is expressed as follows, EQU if A is .alpha. then X is .gamma. (1)
and when there are two conditions, the rule is expressed, as follows, EQU if (A is .alpha.) and (B is .beta.) then X is .gamma. (2)
In each of the above statements, A and B are the input variables, X is the output variable and .alpha., .beta. and .gamma. are the membership functions. In addition, if necessary, .alpha. and .beta. can be further identified as condition-membership functions, and .gamma. as a conclusion-membership function. Furthermore, the "A is .alpha." in the above statement (1), and the "(A is .alpha.)" and the "(B is .beta.)" in the above statement (2) are conditions, with the condition part being formed from the conditions "A is .alpha." in the case of statement (1) and "(A is .alpha.)" and "(B is .beta.)" in the case of statement (2). Lastly, the statement which forms the conclusion is the action part, and in the case of each of the statements described above, is "X is .gamma.".
Here, the input variable and the output variable are ordinary numerical values (or more broadly defined as real numbers), and are called singletons to distinguish them from the membership function.
The object of the present invention is an inference method using ordinary numerical values (singletons) for the conclusion-membership functions. This is generally called a simplification method. In this case, the conclusion-membership function ".gamma." is a singleton but in this specification, for the sake of convenience of expression, it is called a conclusion-membership function.
A fuzzy inference apparatus executes inference in accordance with an inference rule which is a group of a plural number of the rules described above, and the inference method is of the type which is called a simplification method. Fuzzy inference according to simplification methods is generally expressed by grade calculations, MIN-MAX calculations and defuzzy calculations.
Firstly, a grade calculation is processing to determine a grade for which a condition of each condition part of each rule matches reality (an input value), and is implemented as an calculation or a table look-up which determines a membership value of a membership function.
Regarding the MIN-MAX calculations, a MIN calculation is processing to determine a degree of conformity of the match between each condition statement of each rule and reality, and is performed by the above grade MIN calculations. On the other hand, a MAX calculation is processing to determine the degree to which the action part of each rule contributes to the inference result, and result of MAX calculation which is the degree of suitability of rule having same action parts, and when same part as other action part does not have in all of rule, the degree of suitability of the action part changes to the degree of contribution. The defuzzy calculation is processing to obtain an inference result by means of the average value of the height of the membership function of the membership function value.
When these fuzzy inferences are executed, it is first necessary to determine the rules and the membership function. Generally, the user first creates these either empirically or by sensory intuition. The method of determining the rule and membership function is essential for fuzzy control, and can be described as a large task for the system in accordance with human experience or senses.
However, this is not sufficient in reality and it is necessary to perform tuning of the rules and membership function. This is called optimization processing. A membership function of fuzzy inference is a non-linear function of the input values and the output results and so there is no quantitative method for performing the tuning and, user performs tuning by trial and error.
The simplification method makes the conclusion-membership function a singleton and so the tuning of the membership function requires less effort when compared to the conventional method. Nevertheless, even if the conclusion-membership function is a singleton, its determination must still be performed by trial and error, with the accompanying difficulties. Furthermore, with the conventional method, the necessity to correct the conclusion-membership function after correction of condition-membership function or rule increases the degree of difficulty of the creation of data.
One method for the solution of this problem is, for example, the fuzzy tuning apparatus of Japanese Laid Open Patent 90-105901 (hereinafter termed Conventional Art 1), which uses the input and output data as the basis to determine the degree of suitability, and then uses the degree of suitability and the input and output as the basis either to solve simultaneous equations or to determine a function obtaining the least square of the degree of suitability so that a conclusion-membership function consisted of singleton is obtained.
In addition the fuzzy tuning apparatus disclosed in Japanese Laid Open Patent 92-85603 (hereinafter Conventional art 2) operates observed values obtained from the control object to obtain the features value of the control response. The evaluation value which represents the controllability is determined from evaluation value obtained from feature value or evaluation value or evaluation value obtained from a predetermined calculation equation which represents the controllability. The optimization algorithm uses these evaluation value. A fuzzy tuning apparatus uses the calculation results of calculation by the optimization algorithm to perform a search calculation for the membership function, and obtains the conclusion-membership function in accordance with the calculation results of the search calculation and the calculation results of the optimization algorithm calculation.
In Conventional Art 1, when a precision and the input and output data are used as the basis to determine simultaneous equations, then when the number of rules and the number of pairs of input and output data for a inference object are the same, it is possible to determine a real number value. However, when the number of input and output is less than the number of rules, a solution is not able to obtain, there is a problem in Conventional Art 1 as several input and output data are ignored when the number of pairs of input and output data is less than the number of rules.
Also, Conventional Art 1 is possible to apply the case that the number of pairs of input and output data is greater than the number of rules, when it's case determine the least square of the degree of conformity. However Conventional Art 1 is not able to apply when number of pairs of input and output data is not greater than the number of rules.
Furthermore, in the case of Conventional Art 2, the calculation for conclusion-membership function complex so the configuration also becomes complex and there is not only the problem of the entire apparatus becoming large and consequently expensive, but also the problem of the long calculating time.
By the way, it is possible to use the simplification method so that the expected output values for the inference and the input value can be completely determined and the grade operation and the MIN-MAX calculation are generally non-linear calculations and the defuzzy operation is a linear operation.
In the simplification method, the grade calculation and the MIN-MAX calculation are generally non-linear calculation, and the defuzzy calculation is a liner calculation. The defuzzy calculation is possible to grasp the input of calculation and the expected output value perfectly.
Also, the factors for the determination of the characteristics of fuzzy inference are the three characteristics of the fuzzy inference, the rule and the conclusion-membership function. Here, it is assumed that the conclusion-membership function and the rule are sufficiently appropriate.
When a number of n input data is input, contribution h={h.sub.1, h.sub.2, . . . h.sub.m } is possible to instantly know from the fuzzy inference input value D.sub.in ={D.sub.in.spsb.1, D.sub.in.spsb.2 . . . D.sub.in.spsb.n }. Contribution h is one of input of defuzzy calculation. Moreover, m is the number of conclusion-membership functions.
The output expected value D.sub.EXP of the fuzzy inference is the output expected value for the defuzzy calculation while the defuzzy calculation is an operation of weighted averaging and is linear so that the value of the conclusion-membership function which is another defuzzy input can be obtained by solving multiple simultaneous equations. ##EQU1##
Here, h.sub.i is the degree of contribution of the conclusion-membership function `i`, MF.sub.i is the value of the conclusion-membership function `i`, and `m` is the number of conclusion-membership functions.
If `m` number of pairs {D.sub.in.spsb.1.sub.1, D.sub.in.spsb.2.sub.1, D.sub.inn1, D.sub.EXPi1 } (where l=1, 2, . . . m) of input values and output expected values (hereinafter termed `learning data`) are given, then m pairs of degrees of contribution and output expected values (h.sub.1 1, h.sub.2 1, . . . , h.sub.m1, D.sub.EXPi) are obtained, and equation (4) above becomes ##EQU2## and this is the `m` number of simultaneous equations, so, MF.sub.1, MF.sub.2, . . . , MF.sub.m can all be determined.
However, with these methods, a solution is not obtained with respect to less than `m` pairs of learning data, and it is not possible for learning data of more than m pairs to be reflected in the solution. Conversely, all of the learning data are completely and evenly reflected in the solution. This system assumes that the characteristics required of the system are incorporated into learning data of the minimum data amount (m pairs) and so above method is not only not possible but also unrealistic.